From: Richard M. Stallman Date: Thu, 24 Jan 2002 18:55:53 +0000 (+0000) Subject: (basic-save-buffer-2): Ignore file-error in delete-file. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~59093 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c9783dfe4fda587b0c43a1a8f1383e88006681c1;p=emacs.git (basic-save-buffer-2): Ignore file-error in delete-file. --- diff --git a/lisp/files.el b/lisp/files.el index 8042707e137..e22443b19a1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2745,7 +2745,9 @@ After saving the buffer, this function runs `after-save-hook'." ;; delete the temp file. (or succeed (progn - (delete-file tempname) + (condition-case nil + (delete-file tempname) + (file-error nil)) (set-visited-file-modtime old-modtime)))) ;; Since we have created an entirely new file ;; and renamed it, make sure it gets the